package com.qys.livesMall.shop.service;

import com.qys.livesMall.common.result.R;
import com.qys.livesMall.shop.modal.dto.shop.income.EditHierarchyIncomeConfig;
import com.qys.livesMall.shop.modal.entity.ShopIncomeConfig;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qys.livesMall.shop.modal.vo.ShopIncomeConfigVO;

import java.math.BigDecimal;

/**
 * <p>
 * 店铺收益分佣配置 服务类
 * </p>
 *
 * @author wzy
 * @since 2023-06-27
 */
public interface ShopIncomeConfigService extends IService<ShopIncomeConfig> {
    ShopIncomeConfig get();
    R<ShopIncomeConfigVO> getConfig();

    /**
     * 设置平台抽成
     * @param platform
     * @return
     */
    @Deprecated
     R platform(BigDecimal platform);

    /**
     * 设置主播抽成
     * @param anchor
     * @return
     */
    R anchor(BigDecimal anchor);

    /**
     * 增加层级抽成
     * @param config
     * @return
     */
    R addHierarchy(EditHierarchyIncomeConfig config);

    /**
     * 编辑层级抽成
     * @param config
     * @return
     */
    R editHierarchy(EditHierarchyIncomeConfig config);

    /**
     * 删除层级抽成
     * @param id
     * @return
     */
    R delHierarchy(Integer id);

    R advancePayment(BigDecimal advancePayment);

    BigDecimal getAdvancePaymentConfig();

    boolean checkPlatformRatio(BigDecimal decimal);

    R effectiveShop(BigDecimal effectiveShop);
}
